//
//  TittleView.m
//  ProjectA_ManualGuest
//
//  Created by dingcong on 16/6/17.
//  Copyright © 2016年 丁聪. All rights reserved.
//

#import "TittleView.h"

@implementation TittleView

- (void)dealloc{
    
    [_arrOfTitle release];
    [super dealloc];
    
    
}

- (instancetype)initWithFrame:(CGRect)frame
{
    
    if (self = [super initWithFrame:frame])
    {
        [self creat];
    }
    
    return self;
    
    
}

- (void)setArrOfTitle:(NSArray *)arrOfTitle{
    
    
    for (int i = 0; i < 2; i++)
    {
        [self.subviews[i] setTitle:arrOfTitle[i] forState:UIControlStateNormal];
    }
    
    
}

- (void)creat{
    
    for (int i = 0; i < 2; i++)
    {
        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        
//        button.backgroundColor = [UIColor greenColor];
        
        button.frame = CGRectMake(self.bounds.size.width  / 3.3 + self.bounds.size.width / 4 * i, 32, self.bounds.size.width / 7, 29);
        
        [self addSubview:button];
        
    }
    
    
    
    
}


@end
